#ifndef _BUTTON_H_
#define _BUTTON_H_

#include <interfacelib/Window/window.h>

namespace interfacelib
{
	namespace Window
	{
		class MessageBox;
		class Button : public Window
		{
		public:
		enum
		{
			BUTTON_STATE_NORMAL,
			BUTTON_STATE_OVER,
			BUTTON_STATE_CLICK,
			BUTTON_STATE_DISABLE,
		};
		public:
			Button();
			virtual ~Button();

		public:	
			DWORD getState() { return ( m_buttonState ); };
			virtual void setState( DWORD state );

			virtual void initialize()
			{
				setState( BUTTON_STATE_NORMAL );
				Window::initialize();
			}

		public:	

			virtual void onMouseOver( LONG x, LONG y );
			virtual void onMouseOut( LONG x, LONG y );
			virtual void onLButtonDown( UINT flags, POINT point );

			void setSoundFile( char *filename );
			char *getSoundFile();
		protected:
			void setButtonState( DWORD state );

			DWORD m_buttonState;

			char m_soundFile[ _MAX_PATH ];

		public:
			friend interfacelib::Window::MessageBox;
		};
	}
}

#endif